package com.java2007.hotel.factory;
/**
 * 工厂类
 * @author csl
 * @version V1.0
 * @date 2021/01/22
 **/
public class BeanFactory {
    public static Object getBean(String className){
        try {
            return Class.forName(className).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  null;
    }
}
